html {
  height: 100%;
  width: 100%;
  display: table;
}

#rails-app-content {
  --header-height: 70px;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
  height: calc(100% - var(--header-height));
  margin-left: 250px;
  &.user-banner-present {
    --banner-height: calc(
      2 * var(--pf-v5-global--spacer--xs) +
        (var(--pf-v5-global--LineHeight--md) * var(--pf-v5-global--FontSize--sm))
    ); // banner height is line height and a small padding
    top: calc(
      var(--header-height) + var(--banner-height)
    );

    height: calc(100% - var(--header-height) - var(--banner-height));
  }
  .rails-table-toolbar {
    padding-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  &.pf-v5-c-page {
    display: block;
    grid-template-columns: unset;
    grid-template-areas: unset;
  }
}

body {
  position: absolute; // needed for firefox 100% height bug
  overflow: auto;
  height: 100%;
  width: 100%;
}

#react-app-root {
  height: 100%;
  width: 100%;
  .pf-v5-c-page {
    // pf grid rule stops at @media (min-width: 1200px)
    display: grid;
    grid-template-columns: max-content 1fr;
    grid-template-areas:
      'header header'
      'nav main';
  }
}

.base li {
  list-style: none;
  margin-left: 20px;
}

#actions_dropdown {
  float: right;
  margin-left: 3px;
}

#settings li {
  list-style-type: none;
  padding: 0 0 8px;
}

// text align left
.la {
  text-align: left;
}

// text align right
.ra {
  text-align: right;
}

// text align center
.ca {
  text-align: center;
}

// float  right
.fr {
  float: right;
}

// float left
.fl {
  float: left;
}

#confirmation-modal {
  .modal-dialog {
    width: 850px;
  }

  .modal-body {
    max-height: 500px;
    min-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

#bookmarks-modal .modal-dialog {
  width: 750px;
}

#host-conflicts-modal .modal-dialog {
  width: 650px;
}

.tab-error {
  color: #b94a48 !important;
}

.smart_var_add_match {
  position: relative;
  top: -47px;
}

.action_btn {
  float: right;
  position: relative;
  right: 92px;
  top: -38px;
}

select {
  padding: initial;
}

.delete {
  color: #b94a48 !important;
  cursor: pointer;
}

.inherited {
  color: #444 !important;
  cursor: auto;
}

.descendants {
  color: #444 !important;
  cursor: auto;
}

.used_by_hosts {
  color: #000 !important;
  cursor: auto;
}

.setting_value form {
  margin: 0 !important;
}

.ignore-subnet {
  float: right;
  margin-right: 10px;
  margin-top: -25px;
}

.tabs-left .nav-tabs > li > a.btn:hover {
  background: inherit;
  background-color: #408140;
}

.card-pf a.btn:hover,
.card-pf a.btn {
  color: #4d5258 !important;
}

.audit-content {
  border-bottom: 1px solid #ccc;
  margin-bottom: 9px;
  margin-top: 9px;
  padding-bottom: 9px;
}

.title_filter {
  flex-grow: 1;
  padding-left: 0;
}

#title_action {
  flex-grow: 1;
  display: flex;
  padding-left: 8px;
  padding-bottom: 12px;
}

.grey,
.gray {
  color: #808080 !important;
}

.lightgrey,
.lightgray {
  color: #999 !important;
}

.darkgrey,
.darkgray {
  color: #606060 !important;
}

.black {
  color: #000 !important;
}

.form-group {
  td {
    vertical-align: top;
  }

  div.control-label {
    text-align: left;

    > a {
      padding-left: 10px;
    }
  }
}

.avatar {
  height: 30px;
  width: 30px;

  &.small {
    height: 15px;
    margin: -2px 5px 0 0;
    width: 15px;
  }
}

table.table {
  margin-bottom: 0;
}

table {
  clear: both;

  tr td:last-child {
    .btn {
      float: none;
    }

    .btn-group {
      white-space: nowrap;
    }
  }
}

.table-fixed {
  table-layout: fixed;
}

.nbsp {
  white-space: nowrap;
}

.modal-body {
  max-height: 800px;
}

.label-light {
  font-weight: normal;
  text-shadow: 0 0 0;
}

.console-screen {
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
  display: table;
  min-height: 400px;
  min-width: 720px;
  top: 18px;
  margin: 18px auto;
  position: relative;

  > canvas {
    float: left;
  }
}

.ellipsis-pf-tooltip,
.ellipsis {
  overflow: hidden;
  overflow-wrap: break-word;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-well {
  border: 1px solid #d7d7d7;
  background-size: 100%;
  padding: 15px;
  min-width: 280px;
  min-height: 100px;
  margin-bottom: 15px;

  h2,
  h4 {
    font-weight: normal;
  }
}

.white-space-normal {
  white-space: normal;
}

.fact-col {
  max-width: 500px;
  white-space: normal;
  font-family: monospace;
}

.parameter-value {
  font-family: monospace;
}

.fact-origin {
  text-align: center;
  width: 60px;

  img {
    width: 14px;
  }
}

.exit-fullscreen {
  position: fixed;
  right: 20px;
  top: 80px;
}

.config_group,
.selected_config_group {
  min-height: 30px;
}

#interfaceModal {
  .modal-dialog {
    min-width: 1000px;
  }

  .modal-body {
    max-height: none;
  }
}

#addInterface {
  margin-bottom: 5px;
  margin-left: 10px;
}

.interface-down {
  color: #808080;
}

#interfaceList.table {
  border-collapse: separate;
  border-width: 1px 0;

  tr {
    th:first-child,
    td:first-child {
      border-width: 1px 1px 0;
    }

    th,
    td {
      border-width: 1px 1px 0 0;
    }
  }

  tr.has-error {
    td:first-child {
      border-left: 1px solid #a94442;
    }

    td:last-child {
      border-right: 1px solid #a94442;
    }

    td {
      border-bottom: 1px solid #a94442;
      border-top: 1px solid #a94442;
      color: #333;
    }
  }

  .primary-flag,
  .managed-flag,
  .provision-flag {
    color: #bbb;
    cursor: pointer;
    margin: 2px;

    &:hover {
      color: #999;
    }

    &.active {
      color: #000;

      &:hover {
        color: #428bca;
      }
    }
  }
}

.additional-info {
  font-size: 75%;
}

.autocomplete-input {
  display: inline-block !important;
}

.glyphicon.nic-flag {
  margin: 2px;
}

.lookup-keys-container {
  li .close {
    display: none;
  }

  li.active .close {
    display: block;
  }
}

.toggle-hidden-value {
  span {
    display: none;
  }

  &.unhide span {
    display: inline;
  }
}

.replace-hidden-value {
  .full-value {
    display: none;

    &.unhide {
      display: inline;
      width: 90%;
      word-break: break-all;
    }
  }
}

.children_fields {
  margin-bottom: 10px;
}

.remove-button {
  float: right;
  margin-right: 30px;
}

.removable-item {
  margin-bottom: 25px;
}

.fullscreen {
  height: 90vh !important;
  width: 100%;
  margin-top: 20px;
  font-family: monospace;
}

.select2-arrow > b {
  margin: -2px 0 0;
}

.icon-white {
  color: #fff;
}

.select2-container .select2-choices .select2-search-field input,
.select2-container .select2-choice,
.select2-container .select2-choices .select2-chosen {
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  line-height: 2;
}

.navbar-editor
  > span
  > .select2-container
  .select2-choices
  .select2-search-field
  input,
.select2-container .select2-choice,
.select2-container .select2-choices .select2-chosen {
  height: 24px;

  .select2-search-choice-close {
    top: 6px;
  }
}

.select2-chosen,
.select2-choice > span:first-child,
.select2-container .select2-choices .select2-search-field input {
  padding: 0;
}

.select2-chosen,
.select2-choice > span:first-child,
.select2-container .select2-choices .select2-search-field input {
  padding-left: 6px;
}

.expander {
  cursor: pointer;

  .caret {
    margin-right: 5px;
    transform: rotate(0deg);
    transition-duration: 0.8s;
  }

  &.collapsed .caret {
    transform: rotate(-90deg);
  }
}

.error-message {
  padding-right: 10px;
}

.break-me {
  white-space: pre-line;
  word-break: break-all;
}

.big {
  color: #797979;
  font-size: 3rem;
}

#turbolinks-progress {
  display: none;
  z-index: 10000;

  div {
    height: 20px;
    margin-left: 15px;
    margin-top: 15px;
    width: 20px;
  }
}

.white-header {
  background-color: #fff !important;

  th {
    background-color: #fff !important;
  }
}

.spinner-placeholder {
  position: absolute;
}

.spinner-label {
  display: block;
  float: left;
}

.modal-big {
  width: 80%;
}

.modal-spinner {
  display: block;
  left: 50%;
  position: absolute;
  top: 50%;
}

@media screen and (min-width: 768px) {
  .modal-big {
    width: 70%;
  }
}

.pre-scrollable-xy-modal {
  max-height: 200px;
  overflow: auto;
  overflow-wrap: normal;
  padding: 4px;
  white-space: pre;
  word-wrap: normal;
}

.masked-input {
  font-family: 'AllBullets';
}

.btn-spinner {
  .spinner {
    margin: 0.3em;
  }

  .caption {
    float: right;
  }
}

code.transparent {
  background-color: transparent;
  color: #000;
  padding: 0;
}

.editable-empty {
  color: #808080;
}

#parameters {
  .table {
    tr {
      td {
        border-top: 0;
      }

      &.error-msg-block td {
        .help-block {
          margin-top: 0;
        }
      }

      &.fields td {
        padding-top: 10px;
      }
    }
  }
}

.per-page {
  margin-right: 5px;
}

.factsTable .breadcrumb {
  padding: 0;
  margin-bottom: 0;
}

.scrollable-dropdown {
  max-height: 400px;
  overflow-y: auto;
  max-width: 175px;
}

td .dropdown-menu > li > a.disabled:hover,
td .dropdown-menu > li > a.disabled:focus {
  cursor: pointer;
}

span.btn a.disabled {
 color: #8b8d8f;
}

.compact-ui {
  td.pf-v5-c-table__td {
    padding-top: 2px;
    padding-bottom: 2px;
    > button {
      padding:0;
    }
  }
}
